#include "DemoButton.h"
#include "GraphicFactory.h"

namespace Implement
{
	using Core::Devices::MouseEvent;
	using namespace Graphics;

	DemoButton::DemoButton(const Core::Position& pos,const Core::Size& size):Button(pos,size)
	{
		this->Load("testset.xml");
		GraphicFactory::getInstance()->GetGraphic2D()->Add(this);
	}

	void DemoButton::OnMouseClick(const MouseEvent& mouse,const Core::Devices::KeyboardEvent& keyboardMessage)
	{
		::MessageBox(NULL,"hello","click",0);
	}

	const Core::Position& DemoButton::GetPos()
	{
		return this->m_pos;
	}

	int DemoButton::GetID()
	{
		return (int)Button::GetState();
	}
	float DemoButton::GetSpeed(void)
	{
		return 1.0f;
	}
}
